package cloud.daodao.storm.security.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

import java.time.Duration;

/**
 * @author DaoDao
 */
@Data
@Configuration
public class AppConfig {

    @Value("${spring.application.name:}")
    private String application;

    @Value("${app.cache.duration:1h}")
    private Duration cacheDuration;

    @Value("${app.cache.enable:true}")
    private Boolean cacheEnable;

    /**
     * 是否启用验证码万能密钥
     */
    @Value("${app.captcha.master-key.enable:false}")
    private Boolean captchaMasterKeyEnable;

    /**
     * 验证码万能密钥默认值
     */
    @Value("${app.captcha.master-key.value:0607}")
    private String captchaMasterKeyValue;

}
